package com.hyts.dess.stateful.egine.config;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by weiqingming on 2019/11/27.
 * 通知类型
 */
@AllArgsConstructor
@Getter
public enum ActionTypeEnum {

    HTTP("HTTP", "HTTP"),
    RPC("RPC", "RPC"),
    NO_NOTIFY("NO_NOTIFY", "不通知"),;

    String code;
    String desc;

    public static ActionTypeEnum getByCode(String code) {
        for (ActionTypeEnum item : values()) {
            if (code.equals(item.code)) {
                return item;
            }
        }
        return null;
    }
}
